<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2016-12-02
 * Time: 10:27
 */
namespace  app\src\powersystem\enum;

class AdminRoleEnum{
    //后台登录角色-统一
    const ROLE_Admin  = "role_admin";
    const ROLE_Finance = "role_finance";

    const ROLE_Option  = "role_Option";
    const ROLE_Service  = "role_Service";
    const ROLE_Personal = "role_Personal";
    const ROLE_CityService = "role_CityService";
    const ROLE_ProvinceService = "role_ProvinceService";


    //前台用户角色


    public static function getRoleIDBy($role_code){
        switch ($role_code){
            case AdminRoleEnum::ROLE_Admin:
                return 1;
                break;
            case AdminRoleEnum::ROLE_Option:
                return 2;
                break;
            case AdminRoleEnum::ROLE_Personal:
                return 3;
                break;
            case AdminRoleEnum::ROLE_CityService:
                return 4;
                break;
            case AdminRoleEnum::ROLE_ProvinceService:
                return 5;
                break;
            case AdminRoleEnum::ROLE_Service:
                return 6;
                break;
            case AdminRoleEnum::ROLE_Finance:
                return 11;
            default:
                return -1;
                break;
        }
        
    }

}